﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="设备出库_Out.aspx.cs" Inherits="syc.Jidong.设备出库_Out" %>
<html>
<body>
    <script type="text/javascript" language="javascript" src="/common.js"></script>
    <form id="form1" runat="server">
    <div id="wintop" class="wintop">设备出库</div>
        <asp:Panel ID="Panel1" runat="server" CssClass="panel">
            <asp:Button ID="Button_New" runat="server" Text="新 建" CssClass="button" 
                UseSubmitBehavior="False" onclick="Button_New_Click" Visible="False" />
            <asp:Button ID="Button_Calc" runat="server" Text="计算金额" CssClass="button" 
                UseSubmitBehavior="False" onclick="Button_Calc_Click" />
            <asp:Button ID="Button_Finish" runat="server" Text="保 存" CssClass="button" 
                UseSubmitBehavior="False" onclick="Button_Finish_Click" />
             <span style="width:30px;"></span><input id="Button1" type="button" value="返 回"  
             onclick="document.location.href='设备出库_Out_Bill.aspx'" class="button" /></span> 
        </asp:Panel>
        <asp:Panel ID="Panel2" runat="server" CssClass="panel2">
            <asp:Label ID="Message" runat="server" Text="·准备就绪" CssClass="prompt"></asp:Label>
        </asp:Panel>


        <script>            putBillHead();</script>

        <table border="0" cellpadding="3" style="width:800px;border-collapse: collapse;font-size:14px; padding:20px;">
	        <tr>
		        <td class="bill_title" colspan="3" align="center"><u>设备出库单</u></td>
	        </tr>	      
	        <tr>
		        <td class="style1" >编码：SYC/ZJ-WL-06		      
                </td>
		        <td align="center" >
                    <asp:TextBox ID="RiQi" runat="server" CssClass="intxt1" 
                        Width="120px"></asp:TextBox>
                        <img alt="" src="/Icons/29.png" align="middle" onclick="makecalendar(document.getElementById('RiQi').value, document.getElementById('RiQi'));" /></td>
		        <td align="right" class="style2">No.<font color="#FF0000"><asp:TextBox ID="DanHao" 
                        runat="server" CssClass="intxt1" ForeColor="Red" Width="120px" Text="00"></asp:TextBox>
                    </font></td>
	        </tr>
        </table>
           <table border="1" cellspacing="0" cellpadding="0" style="width:800px;border-collapse: collapse;font-size:14px;" bordercolor="#666666">
        <tr>
    <td><div align="center">设备名称</div></td>
    <td><div align="center">规格及型号</div></td>
    <td><div align="center">单位</div></td>
    <td><div align="center">数量</div></td>
    <td><div align="center">价格</div></td>
    <td><div align="center">重量</div></td>
    <td><div align="center">质保书及合格证</div></td>
    <td><div align="center">出厂编号</div></td>
  </tr>
  <tr>
    <td><div align="center">
        <asp:TextBox ID="R1_C1" runat="server" Width="120px" CssClass="blank_center" 
            ReadOnly="True"></asp:TextBox>
        </div></td>
    <td><div align="center">
        <asp:TextBox ID="R1_C2" runat="server" Width="80px" CssClass="blank_center" 
            ReadOnly="True"></asp:TextBox>
        </div></td>
    <td><div align="center">
        <asp:TextBox ID="R1_C3" runat="server" Width="40px" CssClass="blank_center"></asp:TextBox>
        </div></td>
    <td><div align="center">
        <asp:TextBox ID="R1_C4" runat="server" Width="80px" CssClass="blank_center" 
            ReadOnly="True" onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false"></asp:TextBox>
        </div></td>
    <td><div align="center">
        <asp:TextBox ID="R1_C5" runat="server" Width="80px" CssClass="blank_center" 
            ReadOnly="True" onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false"></asp:TextBox>
        </div></td>
    <td><div align="center">
        <asp:TextBox ID="R1_C6" runat="server" Width="80px" CssClass="blank_center" 
            ReadOnly="True"></asp:TextBox>
        </div></td>
    <td><div align="center">
        <asp:TextBox ID="R1_C7" runat="server" Width="120px" CssClass="blank_center" 
            ReadOnly="True"></asp:TextBox>
        </div></td>
    <td><div align="center">
        <asp:TextBox ID="R1_C8" runat="server" Width="120px" CssClass="blank_center" 
            ReadOnly="True"></asp:TextBox>
        </div></td>
  </tr>
  <tr>
    <td><div align="center">附属设备名称</div></td>
    <td><div align="center">规格及型号</div></td>
    <td><div align="center">
            </div></td>
    <td><div align="center"></div></td>
    <td><div align="center"></div></td>
    <td><div align="center"></div></td>
    <td><div align="center"></div></td>
    <td><div align="center"></div></td>
  </tr>
  <tr>
    <td><div align="center">
        <asp:TextBox ID="TextBox1" runat="server" Width="120px" CssClass="blank_center" 
            ReadOnly="True"></asp:TextBox>
        </div></td>
    <td><div align="center">
        <asp:TextBox ID="TextBox2" runat="server" Width="80px" CssClass="blank_center" 
            ReadOnly="True"></asp:TextBox>
        </div></td>
    <td><div align="center"></div></td>
    <td><div align="center"></div></td>
    <td><div align="center"></div></td>
    <td><div align="center"></div></td>
    <td><div align="center"></div></td>
    <td><div align="center"></div></td>
  </tr>
  <tr>
    <td><div align="center">
        <asp:TextBox ID="TextBox3" runat="server" Width="120px" CssClass="blank_center" 
             ReadOnly="True"></asp:TextBox>
        </div></td>
    <td><div align="center">
        <asp:TextBox ID="TextBox4" runat="server" Width="80px" CssClass="blank_center" 
            ReadOnly="True"></asp:TextBox>
        </div></td>
    <td><div align="center"></div></td>
    <td><div align="center"></div></td>
    <td><div align="center"></div></td>
    <td><div align="center"></div></td>
    <td><div align="center"></div></td>
    <td><div align="center">
                <asp:Button ID="Button_Add" runat="server" CssClass="smallbutton" Text="添 加" 
                    CommandArgument="1" oncommand="Button_Add_Command" 
            UseSubmitBehavior="False" />
            </div></td>
  </tr>
  <tr>
    <td><div align="center">备注</div></td>
    <td colspan="7">
        <asp:TextBox ID="TextBox0" runat="server" CssClass="blank_center" Height="50px" 
            ReadOnly="True" Width="98%"></asp:TextBox>
      </td>
  </tr>
</table>
    
        <table border="0" cellpadding="0" style="width:750px;border-collapse: collapse;font-size:14px;margin-top:4px;">
	            <tr>
                    <td nowrap align="right">主管：<asp:DropDownList ID="CangChuZhuGuan" runat="server" 
                            Width="80px" DataSourceID="SqlDataSource4" DataTextField="Value" 
                            DataValueField="Value">
                        </asp:DropDownList>
                        <asp:SqlDataSource ID="SqlDataSource4" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
                            SelectCommand="SELECT [Value] FROM [系统变量] where [Name]='仓储主管'"></asp:SqlDataSource>
                    </td>
                    <td nowrap align="right">保管员：<asp:DropDownList ID="KuGuanYuan" runat="server" 
                            Width="80px" DataSourceID="SqlDataSource5" DataTextField="Value" 
                            DataValueField="Value">
                        </asp:DropDownList>
                        <asp:SqlDataSource ID="SqlDataSource5" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
                            SelectCommand="SELECT [Value] FROM [系统变量] where [Name]='库管员'"></asp:SqlDataSource>
                    </td>
                    <td nowrap align="right">领用单位主管：<asp:DropDownList ID="LingYongZhuGuan" runat="server" 
                            Width="80px" DataSourceID="SqlDataSource6" DataTextField="Value" 
                            DataValueField="Value">
                        </asp:DropDownList>
                        <asp:SqlDataSource ID="SqlDataSource6" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
                            SelectCommand="SELECT [Value] FROM [系统变量] where [Name]='部门主管'"></asp:SqlDataSource>
                    </td>
                    <td nowrap align="right">领用人：<asp:DropDownList ID="LingYongRen" runat="server" 
                            Width="80px" DataSourceID="SqlDataSource7" DataTextField="Value" 
                            DataValueField="Value">
                        </asp:DropDownList>
                        <asp:SqlDataSource ID="SqlDataSource7" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
                            SelectCommand="SELECT [Value] FROM [系统变量] where [Name]='领用人'"></asp:SqlDataSource>
                    </td>          
                </tr>
	        </tr>

        </table>

        <script>            putBillFoot();</script>
        
        <asp:Panel ID="Panel_Grid" runat="server" Visible="False">
        <iframe id="gridback" style="left:125px;top:170px;position:absolute;width:0px;height:0px;z-index: 1;"></iframe>
        <div id="gridframe" class="gridframe" style="left:125px;top:170px;">
        
            <div class="gridview">
            
                <table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolor="#d0d0d0">
	                <tr>
		                <td class="grid-title"><asp:ImageButton ID="ImageButton_Cancel" 
                                ImageUrl="~/Icons/cancel.gif" AlternateText="关闭" ImageAlign="Right" 
                                runat="server" onclick="ImageButton_Cancel_Click" />选择备品备件
                        </td>
		            </tr>
		            <tr>
		                <td class="grid-back">
                            <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                                ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
                                SelectCommand="SELECT * FROM [设备]"></asp:SqlDataSource>
                            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                                AutoGenerateColumns="False" CssClass="grid" DataKeyNames="ID" 
                                DataSourceID="SqlDataSource2" 
                                GridLines="None" ondatabound="GridView1_DataBound" 
                                onpageindexchanged="GridView1_PageIndexChanged" AllowSorting="True" 
                                UseAccessibleHeader="False" PageSize="10">
                                <PagerSettings Visible="False" />
                                <RowStyle CssClass="grid-row-normal" />
                                <Columns>
                                    <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False"  ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
                                        ReadOnly="True" SortExpression="ID" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center" >
    <HeaderStyle CssClass="grid-header"></HeaderStyle>

    <ItemStyle HorizontalAlign="Center" CssClass="grid" Width="80px"></ItemStyle>
                                    </asp:BoundField>
                                    <asp:BoundField DataField="设备名称" HeaderText="设备名称" SortExpression="设备名称" ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
                                        ItemStyle-Width="80" >
    <HeaderStyle CssClass="grid-header"></HeaderStyle>

    <ItemStyle CssClass="grid" Width="80px"></ItemStyle>
                                    </asp:BoundField>
                                    <asp:BoundField DataField="规格" HeaderText="规格" SortExpression="规格" ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
                                        ItemStyle-Width="80" >
    <HeaderStyle CssClass="grid-header"></HeaderStyle>

    <ItemStyle CssClass="grid" Width="80px"></ItemStyle>
                                    </asp:BoundField>
                                     <asp:BoundField DataField="单位" HeaderText="单位" SortExpression="单位" ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
                                        ItemStyle-Width="80" >
    <HeaderStyle CssClass="grid-header"></HeaderStyle>

    <ItemStyle CssClass="grid" Width="80px"></ItemStyle>
                                    </asp:BoundField>   
                                     <asp:BoundField DataField="单价" HeaderText="单价" SortExpression="单价" ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
                                        ItemStyle-Width="80" >
    <HeaderStyle CssClass="grid-header"></HeaderStyle>

    <ItemStyle CssClass="grid" Width="80px"></ItemStyle>
                                    </asp:BoundField>                                  
                                     <asp:BoundField DataField="出厂编号" HeaderText="出厂编号" SortExpression="出厂编号" ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
                                        ItemStyle-Width="80" >
    <HeaderStyle CssClass="grid-header"></HeaderStyle>

    <ItemStyle CssClass="grid" Width="80px"></ItemStyle>
                                    </asp:BoundField>
                                    <asp:BoundField DataField="出厂日期" HeaderText="出厂日期" SortExpression="出厂日期" ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
                                        ItemStyle-Width="80" >
    <HeaderStyle CssClass="grid-header"></HeaderStyle>

    <ItemStyle CssClass="grid" Width="80px"></ItemStyle>
                                    </asp:BoundField>
                                    
                                    <asp:TemplateField HeaderText="操作" ShowHeader="true" ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header" ItemStyle-Width="60" ItemStyle-HorizontalAlign="Center">
                                        <ItemTemplate>
                                            <asp:Button ID="Button1" runat="server" CommandArgument='<%# Eval("ID")+"\t"+Eval("设备名称")+"\t" +Eval("规格")+"\t" +Eval("单位")+"\t" +Eval("重量")+"\t" +Eval("质保书及合格证")+"\t" +Eval("出厂编号")+"\t" +Eval("出厂日期")+"\t" +Eval("单价") %>'
                                                Text="选择" CssClass="smallbutton" oncommand="Button1_Command" />
                                        </ItemTemplate>

    <HeaderStyle CssClass="grid-header"></HeaderStyle>

    <ItemStyle HorizontalAlign="Center" CssClass="grid" Width="60px"></ItemStyle>
                                    </asp:TemplateField>
                                </Columns>
                              </asp:GridView>
		                </td>
	                </tr>
	                <tr>
		                <td>
		                    <table width="100%">
		                        <tr>
		                            <td class="pagebar">
                                        <asp:Button ID="Button_Pager_First" runat="server" Text="" ToolTip="首页" 
                                            CssClass="pageturn-first-b" onclick="Pager_Click" CommandName="--" />
                                        <asp:Button ID="Button_Pager_Prev" runat="server" Text="" ToolTip="上一页" 
                                            CssClass="pageturn-prev-b" onclick="Pager_Click" CommandName="-" />
                                        <input type="button" class="page-split" />第<asp:TextBox ID="TextBox_Pager" runat="server" CssClass="pageturn" 
                                            ontextchanged="Pager_Click"></asp:TextBox>页<input type="button" class="page-split" /><asp:Label ID="Label_Pages" runat="server"></asp:Label><input type="button" class="page-split" />
                                        
                                        <asp:Button ID="Button_Pager_Next" runat="server" Text="" ToolTip="下一页" 
                                            CssClass="pageturn-next-b" onclick="Pager_Click" CommandName="+" />
                                        <asp:Button ID="Button_Pager_Last" runat="server" Text="" ToolTip="末页" 
                                            CssClass="pageturn-last-b" onclick="Pager_Click" CommandName="++" />
                                    </td>
                                    <td align="right">
                                        <asp:Label ID="Label_Total" runat="server" CssClass="grid_totalrows"></asp:Label>
                                    </td>
                                </tr>
                           </table>

		                </td>
	                </tr>
                </table>
                

            </div>
        </div>

    <script>
        var gb = document.getElementById("gridback");
        var gf = document.getElementById("gridframe");
        gb.style.width = gf.clientWidth + "px";
        gb.style.height = gf.clientHeight + "px";
        
    </script>
    
    </asp:Panel>
    </form>
    
    <script>
        var textboxs = document.getElementsByTagName("input");
        for (var i = 0; i < textboxs.length; i++) {
            if (textboxs[i].className == "pageturn" || textboxs[i].className == "intxt1" || textboxs[i].className == "intxt2") {
                textboxs[i].onfocus = function(e) { this.select(); };
            }
        }
    </script>
</body>
</html>
